using System;
using System.Collections.Generic;
using System.Text;

namespace Payroll
{
    public abstract class ChangeAffiliationTransaction:ChangeEmployeeTransaction,Affiliation
    {
        public ChangeAffiliationTransaction(int empid)
            : base(empid)
        {
        }

        public override void Change(Employee e)
        {
            RecordMembership(e);

            Affiliation af = GetAffiliation();
            e.SetAffiliation(af);
        }

        public abstract void RecordMembership(Employee e);
        public abstract Affiliation GetAffiliation();

        #region Affiliation Members

        public double CalculateDeductions(Paycheck pc)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        #endregion
    }
}
